package com.cupcorn.lib.game;

import org.andengine.entity.shape.RectangularShape;
import org.andengine.entity.text.Text;
import org.andengine.entity.text.TextOptions;
import org.andengine.opengl.font.IFont;
import org.andengine.opengl.vbo.DrawType;
import org.andengine.opengl.vbo.VertexBufferObjectManager;

import com.cupcorn.lib.Anchor;
import com.cupcorn.lib.Ratio;
import com.cupcorn.lib.Utils;

public class GameText extends Text
{
	
	public GameText(float pX, float pY, IFont pFont, CharSequence pText, TextOptions pTextOptions, VertexBufferObjectManager pVertexBufferObjectManager)
	{
		super(pX, pY, pFont, pText, pTextOptions, pVertexBufferObjectManager);
	}
	
	public GameText(float pX, float pY, IFont pFont, CharSequence pText, VertexBufferObjectManager pVertexBufferObjectManager)
	{
		super(pX, pY, pFont, pText, pVertexBufferObjectManager);
	}
	
	public GameText(final float pX, final float pY, final IFont pFont, final CharSequence pText, final int pCharactersMaximum, final VertexBufferObjectManager pVertexBufferObjectManager) {
		super(pX, pY, pFont, pText, pCharactersMaximum, pVertexBufferObjectManager, DrawType.STATIC);
	}
	
	public void setPosition(float pX, float pY, Anchor anchor, Ratio ratio)
	{
		super.setPosition(Utils.getPosX(pX, this.mWidth, anchor, ratio), Utils.getPosY(pY, mHeight, anchor, ratio));
	}
	
	public void setPosition(RectangularShape rect, float pX, float pY, Anchor anchor, Ratio ratio)
	{
		super.setPosition(Utils.getPosX(pX, this.mWidth, anchor, ratio, rect), Utils.getPosY(pY, mHeight, anchor, ratio, rect));
	}
	
}
